-
Notifications
You must be signed in to change notification settings - Fork 619
Show Payment Modal when applying a coupon if account has no validPayment method setup #5011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show Payment Modal when applying a coupon if account has no validPayment method setup #5011
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @MananTank and the rest of your teammates on |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5011 +/- ##
=======================================
Coverage 47.77% 47.77%
=======================================
Files 1058 1058
Lines 57276 57276
Branches 3946 3946
=======================================
Hits 27362 27362
Misses 29223 29223
Partials 691 691
*This pull request uses carry forward flags. Click here to find out more. |
size-limit report 📦
|
Merge activity
|
…ent method setup (#5011) ## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on enhancing the `ApplyCouponCard` and `CouponSection` components to handle payment setups more effectively, allowing users to be prompted to add a payment method when applying coupons. ### Detailed summary - Added `isPaymentSetup` and `onAddPayment` props to `ApplyCouponCard` and `ApplyCouponCardUI`. - Implemented logic to call `onAddPayment` if no payment setup exists. - Updated `CouponSection` to accept `isPaymentSetup` and `onAddPayment` props. - Replaced modal opening logic with state management in the `Billing` component. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
8a64f3b to
e8ab274
Compare
…ent method setup (#5011) ## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR enhances the `ApplyCouponCard` and `CouponSection` components to manage payment setup states. It introduces new props to control payment modal visibility and modifies coupon application logic based on payment status. ### Detailed summary - Added `isPaymentSetup` and `onAddPayment` props to `ApplyCouponCard` and `CouponSection`. - Updated `ApplyCouponCardUI` to handle payment setup state and trigger modal when no payment is set up. - Modified `Billing` component to manage payment modal state. - Adjusted `CouponSection` to invoke payment modal when needed. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
e8ab274 to
99e4aad
Compare
…ent method setup (#5011) ## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on enhancing the `ApplyCouponCard` and `CouponSection` components to handle payment setup states more effectively, allowing users to add payment methods when attempting to apply coupons. ### Detailed summary - Added `isPaymentSetup` and `onAddPayment` props to `ApplyCouponCard` and `ApplyCouponCardUI`. - Updated `ApplyCouponCardUI` to call `onAddPayment` if payment is not set up. - Modified `CouponSection` to accept `isPaymentSetup` and `onAddPayment` props. - Replaced modal handling with state management for payment modal in `Billing` component. - Updated `CouponSection` rendering in `Billing` to pass the new props. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
99e4aad to
31056b3
Compare
…ent method setup (#5011) ## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on enhancing the `ApplyCouponCard` and `CouponSection` components to handle payment setup states and manage payment modal visibility more effectively. ### Detailed summary - Added `isPaymentSetup` and `onAddPayment` props to `ApplyCouponCardUI` and `ApplyCouponCard`. - Updated `ApplyCouponCard` to conditionally call `onAddPayment`. - Modified `CouponSection` to receive `isPaymentSetup` and `onAddPayment`. - Replaced modal handling with state in `Billing`. - Adjusted `CouponSection` usage in `Billing` to manage payment modal visibility. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
31056b3 to
f74c7d4
Compare
…ent method setup (#5011) ## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces a payment setup feature in the `ApplyCouponCard` component, allowing users to add payment methods before applying coupons. It enhances the UI and functionality related to payment methods and coupon application. ### Detailed summary - Added `isPaymentSetup` and `onAddPayment` props to `ApplyCouponCardUI` and `CouponSection`. - Updated `ApplyCouponCard` to handle payment setup checks. - Modified `onSubmit` in `ApplyCouponCardUI` to prompt for payment if not set up. - Adjusted modal handling for payment methods in `Billing` component. - Updated stories to reflect changes in payment setup logic. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
f74c7d4 to
cf7e4e9
Compare
…ent method setup (#5011) ## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR enhances the `ApplyCouponCard` and `CouponSection` components by introducing new props for handling payment setup. It allows the UI to conditionally display messages and trigger payment modals based on the payment status. ### Detailed summary - Added `isPaymentSetup` and `onAddPayment` props to `ApplyCouponCardUI`. - Updated `ApplyCouponCard` to handle new props. - Modified the `onSubmit` method to check payment setup status. - Enhanced `CouponSection` to receive and use new props. - Replaced modal handling with state management in `Billing`. - Updated `CouponSection` to trigger payment modal when needed. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
cf7e4e9 to
6ceb24b
Compare

Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR introduces the handling of payment setup in the
ApplyCouponCardandCouponSectioncomponents. It adds functionality to prompt users to add a payment method when applying a coupon if no valid payment is set up.Detailed summary
isPaymentSetupandonAddPaymentprops toApplyCouponCardandApplyCouponCardUI.CouponSectionto includeisPaymentSetupandonAddPaymentprops.onSubmitinApplyCouponCardUIto callonAddPaymentif no payment is set up.bottomTextinApplyCouponCardUIbased on payment setup status.Billingcomponent to manage payment modal visibility.CouponSectionrendering to trigger payment modal when no valid payment is set.